Page({
  /**
  * 页面的初始数据
  */
  data:{
  id:'',
  data:[],
  page:1,
  last_page:''
  },
  /**
  * 生命周期函数--监听页面加载
  */
  onLoad(options){
  let token=wx.getStorageSync('token')
  wx.request({
  url:'http://www.healthcare.com/api/lx/health_index',
  method:'GET',
  header:{AUTHORIZATION:token},
  success:(res)=>{
  let last_page=res.data.last_page;
  let data=res.data.data;
  this.setData({
  data:data,
  last_page:last_page
  })
  }
  });
  },
  detail(e){
    console.log(e);
    let id=e.target.dataset.id
  
        wx.redirectTo({
          url: '/pages/article/article?id='+id,
        })
      }
  })